package com.declum.archon.chunkserver.handler.request;

import org.apache.mina.common.ByteBuffer;
import org.apache.mina.common.IoSession;

/**
 * Handler for PING command
 * 
 * @author Clement
 * 
 */
public class PingRequestHandler extends BaseRequestHandler {

	@Override
	public void process(IoSession session, Object msg) throws Exception {
		ByteBuffer out = ByteBuffer.allocate(1024);
		out.putString(this.server.ping().toString(), this.encoder);
		out.flip();
		session.write(out);
		session.close();
	}

}
